n=50
run_test="2D"
ok=0
for ((i=1; i<=n; i++)); do
  rm -rf run.txt
  go test -run $run_test  | tee run.txt
  echo 第$i次运行完毕
  if [ `grep -c "FAIL" run.txt` -ne '0' ]; then
    echo "test failed"
  else
    ((ok++))
  fi
  echo 成功次数$ok次
  sleep 3
done;


echo "总共运行 $n 次, 成功 $ok 次"
read x
read y